﻿using System;

using NL.ADA.ConfigService;
using NL.ADA.ConfigClient;

using NL.ADA.Common;


namespace NL.ADA.ConfigService
{
    // NOTE: If you change the class name "ConfigService" here, you must also update the reference to "ConfigService" in App.config.
    public class ConfigService : IConfigService
    {

        #region IConfigService Members

        public DateTime GetModified(int appId, int modeId)
        {
            ApplicationManager mgr = new ApplicationManager();
            var modified = mgr.GetModified(appId, modeId);
            return modified;

        }
        public int GetModeIdByCode(string mode)
        {
            var mgr = new ModeManager();
            return mgr.GetModeIdByCode(mode);
        }

        public int GetApplicationIdByCode(string applicationCode)
        {
            var mgr = new ApplicationManager();
            return mgr.GetApplicationIdByCode(applicationCode);
        }

        public CustomConfigList GetAllConfigs(int appId, int modeId)
        {
            var mgr = new ConfigManager();
            return mgr.GetAllConfigs(appId, modeId);
        }


        public bool IsConnection()
        {
            return true;
        }

        #endregion
    }
}
